public class Wang {
    public int price; //成员变量
    public void eat(){
        System.out.println("成员方法");
    }

    public Wang(int price) {  //此处为构造方法
        this.price = price;
    }
}
